package com.bamboo.tool.view.component.tree;

import com.bamboo.tool.config.model.ProjectInfo;
import com.bamboo.tool.db.entity.BambooApiMethod;
import com.bamboo.tool.entity.treenode.ProjectNodeInfo;
import com.bamboo.tool.util.StringUtil;
import com.intellij.icons.AllIcons;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

/**
 * @author EDZ
 */
public class ProjectNode extends BaseNode<ProjectNodeInfo> {
    public ProjectNode(ProjectNodeInfo projectInfo) {
        super(projectInfo);
    }

    @Override
    public @Nullable Icon getIcon(boolean selected) {
        return AllIcons.Nodes.Project;
    }

    @Override
    public String toString() {
        ProjectNodeInfo source = this.getSource();
        return source.getName();
    }
}
